package StaticProxy;

public class LoggingProxy implements Service{
    private final Service realService;

    public LoggingProxy(Service realService) {
        this.realService = realService;
    }

    @Override
    public void doTask() {
        System.out.println("LoggingProxy: 开始执行任务...");
        realService.doTask();
        System.out.println("LoggingProxy: 任务执行完成");
    }
}
